﻿@using HZT.Framework.Contract
@using HZT.Framework.Web.Controls
@using AD.Contract.Models
@using AD.WebEx
@using AD.Contract
@model PagedList<ADBill>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@{
    ViewBag.Title = "金额确认订单";
}
@section PageSpecificStyleSheetIncludes{
}
<div>
    <div>
        @using (Html.BeginForm(null, null, null, FormMethod.Get, new { id = "search", @class = "form-inline" }))
        { 
            <div class="p5">
                <label>
                    广告部门：</label>
                @Html.DropDownList("ADBill.DepartmentId", ViewData["DepartmentId"] as SelectList, "--请选择--", new { @class = "my-select-css-class" })
                <label>
                    合同编号/客户单位：</label>@Html.TextBox("ADBill.CustomerId", Request["ADBill.CustomerId"], new { @class = "m-wrap small" })&nbsp;
                <button type="submit" class="btn">
                    搜索 <i class="icon-search"></i>
                </button>
            </div>  
        }
    </div>
    <table class="table table-striped table-hover ">
        <thead>
            <tr>
                <th style="width: 8px;">
                    <input type="checkbox" id="checkall" class="group-checkable" />
                </th>
                <th width="80">
                    广告部门
                </th>
                <th>
                    合同编号
                </th>
                <th>
                    客户名称
                </th>
                <th>
                    签约金额
                </th>
                <th>
                    业务日期
                </th>
                @*  <th>
                    状态
                </th>*@
                <th>
                </th>
               @* <th>
                </th>*@
                <th>
                </th>
            </tr>
        </thead>
        <tbody>
            @foreach (var p in Model)
            {
                <tr>
                    <td>
                        <input type="checkbox" class="checkboxes" name='ids' value='@p.Id' />
                    </td>
                    <td class="blue" style="width: 100px">
                        <span>@(p.dept.Name)</span>
                    </td>
                    <td>
                        <a class="mini purple thickbox" href="@Url.Action("Detail", new { Id = p.Id })?TB_iframe=true&height=300&width=600}">
                            <span>@(p.ContractId)</span></a>
                    </td>
                    <td>
                        <span>@(p.customer.Name)</span>
                    </td>
                    <td>
                        <span>@(p.PurchaseMoney)</span>
                    </td>
                    @*  <td>
                        <span>@(p.Status)</span>
                    </td>*@
                    <td>
                     <span>@(p.BusinessDate.ToString("yyyy-MM-dd"))</span>
                    </td>
                   @* <td style="width:80px">
                        <a class="btn mini purple thickbox" title='' href="@Url.Action("UpLoad", new { Id = p.Id, cId = p.ContractId })?TB_iframe=true&height=300&width=600">
                            <i class=""></i>合同上传</a>
                    </td>*@
                    <td style="width:80px">
                        <a class="btn mini purple" title='' href="@Url.Action("ChangeStatus", new { Id = p.Id, status = EADBillStatus.PlayConfirm.ToString(), callBack = "PlayConfirm" })"><i class=""></i>确认通过
                        </a>
                    </td>
                    <td style="width:80px">
                        <a class="btn mini purple " title='' href="@Url.Action("ChangeStatus", new { Id = p.Id, status = EADBillStatus.WaitPass.ToString(), callBack = "PlayConfirm" })" ><i class=""></i>不通过
                        </a>
                    </td>
                </tr>
            }
        </tbody>
    </table>
    <div class="dataTables_paginate paging_bootstrap pagination">
        @Html.Pager(Model, new PagerOptions() { ShowTotalItemCount = true })
    </div>
</div>